﻿
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<%
		String path = request.getContextPath();
		String basePath = request.getScheme() + "://" + request.getServerName()
				+ ":" + request.getServerPort() + path + "/";
%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
<base href="<%=basePath%>">
<% String authed = (String)session.getAttribute("auth");
	if (!"yes".equals(authed)) {%>
<jsp:forward page="noAuth.jsp" />				          
<%} %>
<title>main</title>
<LINK href="./css/style.css" type=text/css rel=stylesheet>
<script src="./js/WebCalendar.js" type="text/javascript"></script>
<script src="./js/main.js" type="text/javascript"></script>
<script src="./js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="./js/jquery.validate.min.js" type="text/javascript"></script>
<script src="./js/validate.js" type="text/javascript"></script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #5CB7FE;
}
.STYLE1 {font-size: 12px}
.error {background-color: red;}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
a:active {
	text-decoration: none;
}
.STYLE5 {font-size: 12px; color: #FF0000; }
.STYLE6 {
	font-size: 16px;
	font-weight: bold;
}
-->
 </style>
</head>
<script language="javascript">
$(document).ready(function() {
	$("#logType").val("<s:property value="logType"/>");
	var pageBar="<s:property value="pageBar" escape="false"/>";
	if (pageBar == "") {
		$("#pageBar").html("没有数据!");
	} else {
		$("#pageBar").html(pageBar);
	}
});
</script> 

<body style="overflow-x:hidden">

<table width="100%" height="568" border="0" cellpadding="0"
	cellspacing="0" bordercolor="#D8EDFF">
	<!--DWLayoutTable-->
	<tr>
		<td height="8" colspan="4" valign="top"></td>
		<td width="98%" valign="top"></td>
		<td width="5" valign="top"></td>
	</tr>
	<tr>
		<td height="5" colspan="3" align="right" valign="top"><img
			src="images/icon1.jpg" width="6" height="5" /></td>
		<td colspan="2" valign="top"><img src="images/icon2.jpg" width="100%"
			height="5" /></td>
		<td valign="top"><img src="images/icon3.jpg" width="5" height="5" /></td>
	</tr>
	<tr>
		<td width="7" height="523">&nbsp;</td>
		<td width="5" align="right" valign="top" background="images/icon5.jpg"><img
			src="images/icon5.jpg" width="5" height="5" /></td>
		<td colspan="2" valign="top" bgcolor="#D8EDFF">&nbsp;</td>
		<td valign="top" background="images/main_bg.png">
		
		<table width="100%" border="0" cellpadding="0" cellspacing="0"
			bgcolor="#D8EDFF">
			<!--DWLayoutTable-->
			<tr>
				<td height="30" colspan="3" valign="middle"><span class="STYLE1">&nbsp;[系统日志]</span></td>
				<td width="29">&nbsp;</td>
			</tr>
			<tr>
				<td height="59" colspan="3" align="center" valign="middle" class="STYLE6">系&nbsp;&nbsp; 统&nbsp;&nbsp; 日&nbsp;&nbsp;志</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td width="90" height="345">&nbsp;</td>
				<td width="90%" valign="top">
		    <form name="logQuery" id="logQuery" method="post" action="logger.action">
			 <fieldset>
   				 <legend class="STYLE1"><img alt="日志查询" src="images/search.png"/> &nbsp;&nbsp;日志查询</legend>
					<table>
						<tr>
						  <td width="90" align="right" valign="middle"><span class="STYLE1">类型：</span></td>
						  <td width="100" valign="middle"><select name="logType" id="logType">
						    <option value="">ALL</option>
						  	<option value="INFO">INFO</option>
						  	<option value="WARN">WARN</option>
						  	<option value="ERROR">ERROR</option>
						  </select></td>
						  <td width="90" align="right" valign="middle"><span class="STYLE1">日期：</span></td>
						  <td width="100" valign="middle">
						  <input name="date" type="text" id="date" onclick="new Calendar().show(this);" size="10" maxlength="10" style="width:80px; height:18px;" readonly="readonly" value="<s:property value="date"/>"/>
						  <!--  <input name="date" id="date" type="text" onDblClick="setday(this,date)" dataType="Date" format="ymd" size="16" maxlength="20" style="width:80px; height:18px;" onClick="setday(this,date)" value="<s:property value="date"/>">--></td>
					  	  <td width="90" align="right" valign="middle"><span class="STYLE1">关键字：</span></td>
						  <td width="100" valign="middle"><input name="title" id="title" type="text" size="100" maxlength="200" style="width:200px; height:18px;" value="<s:property value="title"/>"></td>
						  <td align="center" valign="middle"><input name="Submit2" type="submit" class="btn1_mouseout" onMouseOver="this.className='btn1_mouseover'" onMouseOut="this.className='btn1_mouseout'" value=" 查 询 "></td>
						  <td><input name="search" type="hidden" value="true"/>
					  	</tr>
				  </table>
		  	 </fieldset>
		  </form>
				<table width="100%" border=0 cellpadding=0 cellspacing=1
					bgcolor=5cb7fe>
					<!--DWLayoutTable-->
					<tr>
						<td width="4%" height="25" align="center"
							bgcolor="#D8EDFF"><span class="STYLE1">序号 </span></td>
						<td width="6%" height="25" align="center"
							bgcolor="#D8EDFF"><span class="STYLE1">类型 </span></td>
				   		<td width="35%" align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1">标题</span></td>
						<td width="43%" align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1">详细信息</span></td>
						<td width="12%" align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1">日期</span></td>
					</tr>
					<s:iterator value="logList" status="cs">
					<tr>
					  <td height="25" align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1"><s:property value="#cs.count"/></span></td>
					  <td height="25" align="center" valign="middle"
							<s:if test="logType == 'ERROR'">bgcolor="red"</s:if><s:else>bgcolor="#D8EDFF"</s:else>><span class='STYLE1'><s:property value="logType"/></span></td>
					  <td align="left" valign="middle"
							bgcolor="#D8EDFF">&nbsp;&nbsp;<span class="STYLE1"><s:property value="title"/></span>&nbsp;&nbsp;</td>
					  <td align="left" valign="middle"
							bgcolor="#D8EDFF">&nbsp;&nbsp;<span class="STYLE1"><s:property value="message"/></span>&nbsp;&nbsp;</td>
					  <td align="center" valign="middle"
							bgcolor="#D8EDFF">&nbsp;&nbsp;<span class="STYLE1"><s:property value="date"/></span>&nbsp;&nbsp;</td>
				  </tr>
				  </s:iterator>
				  <tr>
				  	<td height="25" colspan="5" align="center" valign="middle" bgcolor="#D8EDFF"><span class="STYLE1" id="pageBar"></span></td>
				  </tr>
				</table>
				</td>
				<td width="50">&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
</table>
		</td>
		<td valign="top" background="images/icon6.jpg"><img
			src="images/icon6.jpg" width="5" height="100" /></td>
	</tr>

	<tr>
		<td height="5"></td>
		<td valign="top"><img src="images/icon7.jpg" width="5" height="5" /></td>
		<td colspan="3" valign="top"><img src="images/icon8.jpg" width="100%"
			height="5" /></td>
		<td valign="top"><img src="images/icon9.jpg" width="5" height="5" /></td>
	</tr>
	<tr>
		<td height="2"></td>
		<td></td>
		<td width="1"></td>
		<td width="6"></td>
		<td></td>
		<td></td>
	</tr>
</table>
</body>
</html>
